package com.ruiysoft.entity.order;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author WenJialu
 * @since 2018-10-28
 */
@TableName("order_detail")
public class OrderDetail extends Model<OrderDetail> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("order_id")
    private Long orderId;

    @TableField("order_no")
    private String orderNo;

    @TableField("sku_id")
    private Long skuId;
    /**
     * 0：固定虚拟支付金额方式；1:自由虚拟支付金额方式
     */
    @TableField("price_strategy")
    private Integer priceStrategy;
    /**
     * 现金单价
     */
    @TableField("unit_price")
    private Long unitPrice;
    /**
     * 虚拟单价
     */
    @TableField("virtual_coin_price")
    private Long virtualCoinPrice;
    /**
     * 现金总价值
     */
    @TableField("total_amount")
    private Long totalAmount;
    /**
     * 需要支付的虚拟币
     */
    @TableField("virtual_coin")
    private Long virtualCoin;
    /**
     * 现金总额
     */
    @TableField("total_cash")
    private Long totalCash;
    /**
     * 成本单价
     */
    @TableField("cost_price")
    private Long costPrice;
    /**
     * 数量
     */
    @TableField("quantity")
    private Integer quantity;

    public Long getId() {
        return id;
    }

    public OrderDetail setId(Long id) {
        this.id = id;
        return this;
    }
    public Long getOrderId() {
        return orderId;
    }

    public OrderDetail setOrderId(Long orderId) {
        this.orderId = orderId;
        return this;
    }
    public String getOrderNo() {
        return orderNo;
    }

    public OrderDetail setOrderNo(String orderNo) {
        this.orderNo = orderNo;
        return this;
    }
    public Long getSkuId() {
        return skuId;
    }

    public OrderDetail setSkuId(Long skuId) {
        this.skuId = skuId;
        return this;
    }
    public Long getUnitPrice() {
        return unitPrice;
    }

    public OrderDetail setUnitPrice(Long unitPrice) {
        this.unitPrice = unitPrice;
        return this;
    }
    public Integer getQuantity() {
        return quantity;
    }

    public OrderDetail setQuantity(Integer quantity) {
        this.quantity = quantity;
        return this;
    }
    public Long getTotalAmount() {
        return totalAmount;
    }

    public OrderDetail setTotalAmount(Long totalAmount) {
        this.totalAmount = totalAmount;
        return this;
    }

    public Integer getPriceStrategy() {
        return priceStrategy;
    }

    public OrderDetail setPriceStrategy(Integer priceStrategy) {
        this.priceStrategy = priceStrategy;
        return this;
    }

    public Long getVirtualCoinPrice() {
        return virtualCoinPrice;
    }

    public OrderDetail setVirtualCoinPrice(Long virtualCoinPrice) {
        this.virtualCoinPrice = virtualCoinPrice;
        return this;
    }

    public Long getVirtualCoin() {
        return virtualCoin;
    }

    public OrderDetail setVirtualCoin(Long virtualCoin) {
        this.virtualCoin = virtualCoin;
        return this;
    }

    public Long getTotalCash() {
        return totalCash;
    }

    public OrderDetail setTotalCash(Long totalCash) {
        this.totalCash = totalCash;
        return this;
    }

    public Long getCostPrice() {
        return costPrice;
    }

    public OrderDetail setCostPrice(Long costPrice) {
        this.costPrice = costPrice;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "OrderDetail{" +
        "id=" + id +
        ", orderId=" + orderId +
        ", orderNo=" + orderNo +
        ", skuId=" + skuId +
        ", unitPrice=" + unitPrice +
        ", quantity=" + quantity +
        ", totalAmount=" + totalAmount +
        "}";
    }
}
